Getting auth token - how to fill request

I keep trying to load API token from that URL https://api.refinitiv.com/auth/oauth2/v2/token using Postman application. I've tried to follow the documentation from Swagger and this is how I filled the required fields:
image
image
Unfortunately, the result is:

{
    "error": "invalid_client",
    "error_description": "client_id value doesn't match HTTP Basic username value"
}


I've tried also to provide username/password within body or tried to pass Authorization header with base64 username/password but with no effects. Then the error was:

{
    "error": "invalid_client",
    "error_description": "Invalid client or client credentials."
}


I need that token to be able within new application to authenticate user to be allowed to load data from Refinitiv API. But, perhaps there is a better solution for authenticate user within app, then I would be grateful for information. I build that application using React and ELF library.

@Edit: So far I got a token, but with that URL: https://api.refinitiv.com/auth/oauth2/v1/token ("v1" instead of "v2" within the URL above) and credentials like that:
1640877341878.png
Actually I got the token (first success;), but when I tried to get Business Summary from that URL: https://api.refinitiv.com/user-framework/mobile/overview-service/v1/corp/business-summary/IBM.N then that token didn't work (perhaps because of tle client_id I generated by myself?). I got as a result:

{
    "error": {
        "id": "33dc2c29-5385-46e6-9c30-3cb15fc52ac6",
        "code": "insufficient_scope",
        "message": "access denied. Scopes required to access the resource: [trapi.user-framework.workspace.crud]. Missing scopes: [trapi.user-framework.workspace.crud]",
        "status": "Forbidden"
    }
}

Best Answer

  • Hello @marcin.cholewka,

    Did you have a chance to test with Authentication-> Get Access Token request that is included in RDP Postman Starter Collection and Tutorial Samples example deck?

    You appear to be missing a couple of required parameters in your Get Token request, this is why I am asking.

    Client ID should be generated by yourself, check-marked as "EDP". Please see Quickstart guide for Refinitiv Data Platform for more information on getting started with RDP integration, including client ID requirement.

    Additionally, your user id should be permissioned for the RDP service being requested from. The result of Get Acces Token should include the valid token and on it, please examine stanza "scopes" to see if the scope that is required "trapi.user-framework.workspace.crud" is also permissioned to your user id.

    I hope this information helps.

Answers